package cn.ml.springdemo.MsgAop;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

//此类本身就是增强类，不需要配置
public class CheckMsg implements MethodBeforeAdvice {
    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {
        objects[0]=objects[0].toString().replaceAll("习\\s*近\\s*平","***");
    }
}
